#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>


int main(int argc,char **argv)
{
	int sockfd,ret;
	struct sockaddr_in server_addr;
	socklen_t socklen=sizeof(server_addr);
	memset(&server_addr,0,socklen);
	sockfd=socket(AF_INET,SOCK_DGRAM,0);
	if(sockfd < 0)
	{
		perror("socket:");
		exit(sockfd);
	}
	server_addr.sin_family=AF_INET;
	server_addr.sin_port=htons(1902);
	inet_pton(AF_INET,"127.0.0.1",&server_addr.sin_addr);
	char msg[1024]={0};
	int i;
	for(i=0;i<102400;i++)
	{
	sprintf(msg,"%s%d","/client.c?uid=",i);
	printf("%s\n",msg);
	sendto(sockfd,msg,strlen(msg),0,(struct sockaddr *)&server_addr,socklen);
	memset(msg,0,sizeof(msg));
	ret=recvfrom(sockfd,msg,1024,0,(struct sockaddr *)&server_addr,&socklen);
	//printf("recv: %s\n",msg);
	}
	
}
	
	
